<!--  -->
<template>
  <div>
      <div v-for="(item) in alleva" :key="item.commentId" class="Allcomments_ment">
          <div><van-image round width="30px" height="30px" :src="item.userIcon"/></div>
            
            <div class="Allcomments_all">
                   <div><span>{{item.userName}}</span><van-icon name="diamond-o" /></div> 
                   <div><p class="time_good">{{item.commentCreateTime}}    {{item.goodsName}}</p></div>
                   <div class="span_ford"><span>{{item.commentContent}}</span></div>
                    <div class="Allcomments_image">
                        <van-image v-for="count in item.imgsList.length" :key="count" src="https://img01.yzcdn.cn/vant/cat.jpeg"/>

                    </div>
                    <div class="zhuangt"><p>浏览 156 次    点赞 25 次</p><p class="black">删除评论</p></div>
            </div>
      </div>

  </div>
</template>

<script>
export default {
name : 'Allcomments',
data(){
return{
    alleva:[]
}
},

created(){
    let sess = JSON.parse(sessionStorage.getItem("user"))

  //全部评论条数
  this.$axios.post('/api/marketComment/showByUser?userId='+sess.userId).then((res)=>{
    this.alleva=res.data.data
    console.log(res.data.data)
  }).catch((err)=>{console.log("失败")})
  }
}
</script>

<style  scoped>

.Allcomments_all{
    width: 90%;
    display: flex;
    flex-direction:column;
}
.Allcomments_ment{
    border-bottom: 1px solid #dad5d5;
    margin-right: 10px;
   margin-top: 20px;
   overflow: hidden;
      /* display: flex; */
      /* justify-content: space-around; */
}
.Allcomments_ment>div{
    float: left;
}
.Allcomments_image{
    margin-top: 10px;
     display: flex;
     
}
.Allcomments_image>.van-image{
    width: 110px;
    height: 110px;
}
.time_good{
    font-size: 10px;
    color: #A2A2A2;
}
.span_ford{
    font-size: 13px;
    line-height:25px;
}
.zhuangt{
 
    font-size: 13px;
    display: flex;
    color: #A2A2A2;
    justify-content: space-between;
}
.black{
color: #000;
}
</style>
